Optimal. Leaf size=52 \[ -\frac{a \cot (c+d x)}{d}+\frac{a \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac{a \cot (c+d x) \csc (c+d x)}{2 d}-a x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0771847, antiderivative size = 52, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {2838, 2611, 3770, 3473, 8} \[ -\frac{a \cot (c+d x)}{d}+\frac{a \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac{a \cot (c+d x) \csc (c+d x)}{2 d}-a x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2838
Rule 2611
Rule 3770
Rule 3473
Rule 8
Rubi steps
\begin{align*} \int \cot ^2(c+d x) \csc (c+d x) (a+a \sin (c+d x)) \, dx &=a \int \cot ^2(c+d x) \, dx+a \int \cot ^2(c+d x) \csc (c+d x) \, dx\\ &=-\frac{a \cot (c+d x)}{d}-\frac{a \cot (c+d x) \csc (c+d x)}{2 d}-\frac{1}{2} a \int \csc (c+d x) \, dx-a \int 1 \, dx\\ &=-a x+\frac{a \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac{a \cot (c+d x)}{d}-\frac{a \cot (c+d x) \csc (c+d x)}{2 d}\\ \end{align*}
Mathematica [C] time = 0.0424215, size = 109, normalized size = 2.1 \[ -\frac{a \cot (c+d x) \, _2F_1\left (-\frac{1}{2},1;\frac{1}{2};-\tan ^2(c+d x)\right )}{d}-\frac{a \csc ^2\left (\frac{1}{2} (c+d x)\right )}{8 d}+\frac{a \sec ^2\left (\frac{1}{2} (c+d x)\right )}{8 d}-\frac{a \log \left (\sin \left (\frac{1}{2} (c+d x)\right )\right )}{2 d}+\frac{a \log \left (\cos \left (\frac{1}{2} (c+d x)\right )\right )}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.056, size = 81, normalized size = 1.6 \begin{align*} -ax-{\frac{a\cot \left ( dx+c \right ) }{d}}-{\frac{ca}{d}}-{\frac{a \left ( \cos \left ( dx+c \right ) \right ) ^{3}}{2\,d \left ( \sin \left ( dx+c \right ) \right ) ^{2}}}-{\frac{\cos \left ( dx+c \right ) a}{2\,d}}-{\frac{a\ln \left ( \csc \left ( dx+c \right ) -\cot \left ( dx+c \right ) \right ) }{2\,d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.68494, size = 89, normalized size = 1.71 \begin{align*} -\frac{4 \,{\left (d x + c + \frac{1}{\tan \left (d x + c\right )}\right )} a - a{\left (\frac{2 \, \cos \left (d x + c\right )}{\cos \left (d x + c\right )^{2} - 1} + \log \left (\cos \left (d x + c\right ) + 1\right ) - \log \left (\cos \left (d x + c\right ) - 1\right )\right )}}{4 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.74136, size = 300, normalized size = 5.77 \begin{align*} -\frac{4 \, a d x \cos \left (d x + c\right )^{2} - 4 \, a d x - 4 \, a \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 2 \, a \cos \left (d x + c\right ) -{\left (a \cos \left (d x + c\right )^{2} - a\right )} \log \left (\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) +{\left (a \cos \left (d x + c\right )^{2} - a\right )} \log \left (-\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right )}{4 \,{\left (d \cos \left (d x + c\right )^{2} - d\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.4035, size = 128, normalized size = 2.46 \begin{align*} \frac{a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 8 \,{\left (d x + c\right )} a - 4 \, a \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) \right |}\right ) + 4 \, a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + \frac{6 \, a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 4 \, a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - a}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2}}}{8 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]